# -*- coding: utf-8 -*-
"""
 @Time    : 2021/2/3 下午4:53
 @Author  : tgy



"""


def test01():
    ...
    assert False, '111'


def test02(val):
    try:
        ...
        res = 1 / val
    finally:
        ...
        print('11111')

    print('22222')


def test03(val):
    ...
    try:
        res = 1 / val
    except Exception:
        # 这里不写默认就是抛出捕获到的异常
        raise
    else:
        print('no exception')
    finally:
        ...
        print('close')


def test04(val):
    ...
    try:
        res = 1 / val
    except Exception as e:
        ...
        raise IndexError from None
        # raise IndexError

def test05():
    ...
    assert False,'啊哈哈'

if __name__ == '__main__':
    ...
    # test01()
    test05()
